package com.atguigu.gulimall.search.feign;

import com.atguigu.common.utils.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * 商品服务的远程调用
 *
 * @author LaiSanShan
 * @date 2021-08-14
 */
@FeignClient("gulimall-product")
public interface ProductFeignService {

    /**
     * 查询属性详情
     */
    @GetMapping("/product/attr/info/{attrId}")
    public R info(@PathVariable("attrId") Long attrId);

    /**
     * 所有品牌
     */
    @RequestMapping("/product/brand/infos")
    public R listByIds(@RequestParam("brandIds") List<Long> brandIds);

}
